﻿/*****************************************************************************
Copyright (c) 2011 SmartVault, Inc.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
******************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace SmartVault.Proto
{
    public partial class ClientTokenResponse : IResponseEnvelope
    {
        public ClientTokenResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class BasicUserInfoResponse : IResponseEnvelope
    {
        public BasicUserInfoResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class DelegationTokenResponse : IResponseEnvelope
    {
        public DelegationTokenResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class DeleteFileResponse : IResponseEnvelope
    {
        public DeleteFileResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class ErrorResponse : IResponseEnvelope
    {
        #region IResponseEnvelope Members
        public bool HasMessage
        {
            get { return false; }
        }

        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { throw new InvalidOperationException(); }
        }

        #endregion

        public static ErrorResponse BuildFrom(Exception error)
        {
            ErrorResponse.Builder bld = ErrorResponse.CreateBuilder();
            bld.Error = Error.BuildFrom(error);
            return bld.Build();
        }
    }

    public partial class NodeResponse : IResponseEnvelope
    {
        public NodeResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class NonceResponse : IResponseEnvelope
    {
        public NonceResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class SignUpNewUserResponse : IResponseEnvelope
    {
        public SignUpNewUserResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class UserAgentTokenResponse : IResponseEnvelope
    {
        public UserAgentTokenResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class SendEmailResponse : IResponseEnvelope
    {
        public SendEmailResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }

    public partial class PINEndPointResponse : IResponseEnvelope
    {
        public PINEndPointResponse()
        {
            this.error_ = Error.BuildSuccess();
            this.hasError = true;
        }

        #region IResponseEnvelope Members
        public Google.ProtocolBuffers.IMessage WeakMessage
        {
            get { return this.Message; }
        }
        #endregion
    }
}
